﻿@page "/password"

<RadzenExample Name="Password">
<div class="row">
    <div class="col-md-6">
        <h3>Password</h3>
        <RadzenPassword Style="margin-bottom: 20px" Change="@(args => Change(args, "Password"))" />
        <br />
        <h3>Password with placeholder</h3>
        <RadzenPassword Placeholder="Enter password..." Change="@(args => Change(args, "Password with placeholder"))" Style="margin-bottom: 20px" />
        <br />
        <h3>Disabled Password with placeholder</h3>
        <RadzenPassword Disabled="true" Placeholder="Enter password..." Change="@(args => Change(args, "Disabled Password with placeholder"))" Style="margin-bottom: 20px" />
    </div>
    <div class="col-md-6">
        <h3>Events</h3>
        <RadzenCard style="overflow: auto;height:500px;">
            @foreach (var e in events.OrderByDescending(i => i.Key))
            {
                @e.Value
                <br />
            }
        </RadzenCard>
    </div>
</div>
</RadzenExample>

@code {
    Dictionary<DateTime, string> events = new Dictionary<DateTime, string>();

    void Change(string value, string name)
    {
        events.Add(DateTime.Now, $"{name} value changed to {value}");
        StateHasChanged();
    }
}
